﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace SD.OpcServer.IAppService.DTOs
{
    /// <summary>
    /// 变量数据传输对象
    /// </summary>
    /// <remarks>勿忘[DataMember]</remarks>
    [DataContract(Namespace = "http://SD.OpcServer.IAppService.DTOs")]
    public class VariableInfo
    {
        #region 标识 —— Guid Id
        /// <summary>
        /// 标识
        /// </summary>
        [DataMember]
        public Guid Id { get; set; }
        #endregion

        #region 编号 —— string Number
        /// <summary>
        /// 编号
        /// </summary>
        [DataMember]
        public string Number { get; set; }
        #endregion

        #region 名称 —— string Name
        /// <summary>
        /// 名称
        /// </summary>
        [DataMember]
        public string Name { get; set; }
        #endregion

        #region 数据类型 —— string DataType
        /// <summary>
        /// 数据类型
        /// </summary>
        [DataMember]
        public string DataType { get; set; }
        #endregion

        #region 单位 —— string Unit
        /// <summary>
        /// 单位
        /// </summary>
        [DataMember]
        public string Unit { get; set; }
        #endregion

        #region 是否记录历史 —— bool KeepRecord
        /// <summary>
        /// 是否记录历史
        /// </summary>
        [DataMember]
        public bool KeepRecord { get; set; }
        #endregion

        #region 节点标识 —— string NodeId
        /// <summary>
        /// 节点标识
        /// </summary>
        [DataMember]
        public string NodeId { get; set; }
        #endregion

        #region 设备编号 —— string EquipmentNo
        /// <summary>
        /// 设备编号
        /// </summary>
        [DataMember]
        public string EquipmentNo { get; set; }
        #endregion

        #region 描述 —— string Description
        /// <summary>
        /// 描述
        /// </summary>
        [DataMember]
        public string Description { get; set; }
        #endregion

        #region 值描述字典 —— IDictionary<string, string> ValueDescriptions
        /// <summary>
        /// 值描述字典
        /// </summary>
        /// <remarks>键：变量值，值：变量值描述</remarks>
        [DataMember]
        public IDictionary<string, string> ValueDescriptions { get; set; }
        #endregion
    }
}
